﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="new_register.aspx.cs" Inherits="huaguwang.new_register" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <meta http-equiv="x-ua-compatible" content="ie=7" /> 
    <title>新会员免费注册</title>
    <link href="CSS/css_global.css" rel="stylesheet" type="text/css" />
    <link href="css/css_header_footer.css" rel="stylesheet" type="text/css" />
    <link href="css/validation.css" rel="stylesheet" type="text/css" />
    <link href="CSS/css_register.css" rel="stylesheet" type="text/css" />

    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="js/validationEngine.js" type="text/javascript"></script>
    <script type="text/javascript">
        var imgA = 0;
        function funcXM() {
            $.ajaxSetup({
                async: false
            });
            var blnSS = "资料错误";
            $.getJSON("/user/userfunction.aspx?stype=1", { p1: $("#txtName").attr("value"), p2: "test" }, function(json) {
                if (json.success == "False") {
                    blnSS = json.Msg;
                } else {
                    blnSS = "";
                }
            });
            $.ajaxSetup({
                async: true
            });
            return blnSS;
        }
        function funcYZ() {
            $.ajaxSetup({
                async: false
            });
            var blnSS = "资料错误";
            var sss = $.getJSON("/public/CreateValidate.aspx?stype=code&name=mLogin&r=", function(json) {
                var v = json["Msg"].toLowerCase();
                var txtV = $("#txtYZ").attr("value") || "";
                txtV = txtV.toLowerCase();
                if (v != txtV) {
                    blnSS = "验证码不正确!";
                } else {
                    blnSS = "";
                }
            });
            $.ajaxSetup({
                async: true
            });
            return blnSS;
        }
        $(function() {
            $("#form1").validationEngine({ promptPosition: "centerRight", returnIsValid: false, validationEventTriggers1: "" });
            $("#spanRef").click(function() {
                imgA++;
                $("#verifycode").attr("src", "/public/CreateValidate.aspx?stype=img&name=mLogin&r=" + imgA);
            });
            $("#sub_reg").click(function() {
                if ($("#form1").validationEngine({ promptPosition: "centerRight", returnIsValid: true, validationEventTriggers1: "" })) {

                    $.getJSON("/user/userfunction.aspx?stype=1", { p1: $("#txtName").val(), p2: $("#txtP1").val() }, function(json) {
                        if (json.success == "False") {
                            alert(json.Msg);
                        } else {
                            location.replace("new_register_callback.aspx?msg=" + json.Msg);
                        }
                    });
                };
            });

        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="headerBG top">
        <div class="container">
            <span id="house" class="headerBG house"></span>
            <span id="header_left">
                <a href="index.aspx">将股易加入收藏夹</a>
            </span>
            <span id="header_right">
                <a href="index.aspx">首页</a>|
                <a href="index.aspx">请登录</a>|
                <a href="index.aspx">注册</a>|
                <a href="index.aspx">我的空间</a>|
                <a href="index.aspx">帮助中心</a>|
                <a href="index.aspx">网站导航</a>
            </span>
        </div>
    </div>
    <div class="container">
        <div id="logo">
            <img src="images/logo.gif"/>
        </div>
        <div id="red_septal_red" class="clear">
            <h1 class="title">1.请填写会员信息</h1><h2 class="title_script">(以下均为必填)</h2>
        </div>
        <div id="content_BG">
            <div id="content">
                <ul class="out_per60" style="margin-top:60px;margin-left:40px;">
                    <li>
                        <label>会员名：</label>
                        <input name="username" id="txtName" type="text" class="validate[required,length[3,20],ajaxFunc[funcXM]] input_txt"
                        validatemsg="2-30个字符或数字!" />
                    </li>
                    <li>
                        <label>登录密码：</label>
                        <input type="password" id="txtP1" class="validate[required,length[3,20]] input_txt"
                        validatemsg="2-30个字符或数字!" />
                    </li>
                    <li>
                        <label>确认密码：</label>
                        <input name="password_again" id="password_again" type="password" class="validate[required,confirm[txtP1]] input_txt"  validatemsg="请重复输入登录密码!"/>
                    </li>
                    <li>
                        <label>验证码：</label>
                        <a class="font_12" color="#3366cc" id="spanRef" style="cursor: pointer" title="看不清，换一张？">
                            <img id="verifycode" align="absmiddle" src="/public/CreateValidate.aspx?stype=img&name=mLogin" />
                        </a>&nbsp;
                        <input id="txtYZ" style="width: 85px" class="validate[required,ajaxFunc[funcYZ]]] input_txt"
                            validatemsg="请输入正确的验证码!" />
                    </li>
                    <li><asp:Button ID="Button1" runat="server" CssClass="btn_register" onclick="Button1_Click" /></li>
                    <li><span style="margin-left:-15px;"><a href=""><font color="#3366cc">《华股网服务条款》</font></a></span></li>
                </ul>
            </div>
            <div id="ad">
                <img src="images/login_register/new_register_AD.gif" />
            </div>
        </div>
        <div id="bottom_nav" class="clear">
            <a href="">关于我们</a> | 
            <a href="">免责声明</a> | 
            <a href="">商务合作</a> | 
            <a href="">意见建议</a> | 
            <a href="">招聘信息</a> | 
            <a href="">联系方式</a>
        </div>
        <div id="announce">
            声明：华股网所载文章、数据仅供参考，使用前请核实，风险自负
            <br />
            Copyright © 2010 华股网 All Rights Reserved 版权所有 复制毕竟 京ICP备032145671号
        </div>
        <div id="credit">
            <a><img src="images/credit_01.gif" /></a>
            <a><img src="images/credit_02.gif" /></a>
            <a><img src="images/credit_01.gif" /></a>
            <a><img src="images/credit_02.gif" /></a>
            <a><img src="images/credit_01.gif" /></a>
        </div>
    </div>
    </form>
</body>
</html>
